package com.iot08.common.entity.admin;

import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @version 1.0
 * @Description: 渠道归属实体（旧版命名为代理商）
 * @time: 2020/8/13 18:21
 * @author: Rock
 */
@Data
@Document("channel_affiliation")
public class ChannelAffiliation implements Serializable {
    private static final long serialVersionUID = 1L;

    @Field("_id")
    private String id;

    /**
     * 渠道归属名称
     */
    private String name;

    /**
     * 渠道归属说明
     */
    private String desc;

    /**
     * 渠道归属中包含的渠道id列表
     */
    @Field("channel_ids")
    private List<String> channelIds;

    private Short deleted;

    private String creator;

    @Field("create_time")
    private Date createTime;

    @Field("update_time")
    private Date updateTime;

    @Transient
    private List<Long> channelCodes = new ArrayList<>();

}
